package com.handle.system.svc.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.handle.common.core.result.JsonResult;
import com.handle.system.api.entity.SysDept;
import com.handle.system.api.request.dept.DeptQueryParam;
import com.handle.system.api.service.ISysDeptService;
import com.handle.system.svc.mapper.SysDeptMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 系统部门表 服务实现类
 * </p>
 *
 * @author zhangqing
 * @since 2021-03-05
 */
@Service
@AllArgsConstructor
public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> implements ISysDeptService {

    private final SysDeptMapper sysDeptMapper;

    @Override
    public JsonResult findDeptList(DeptQueryParam deptQueryParam) {
        List<SysDept> sysDepts = sysDeptMapper.selectList(Wrappers.emptyWrapper());
       return JsonResult.success(sysDepts);
    }
}
